<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
    <meta name="format-detection" content="telphone=no, email=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="keywords" content="">
    <meta name="description" content="">
    <title>注册</title>
    <link href="__ROOT__/{$logo.ico}" rel="shortcut icon" type="image/x-icon" />

    <link rel="stylesheet" type="text/css" href="__PUBLIC__/home/Css/register.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/common/css/Hui-iconfont/1.0.7/iconfont.css"/>
    <!--//提高加载-->
    <script  type='text/javascript'>
        function $import(src){
            var scriptElem = document.createElement('script');
            scriptElem.setAttribute('src',src);
            scriptElem.setAttribute('type','text/javascript');
            document.getElementsByTagName('head')[0].appendChild(scriptElem);
        }

        // import with a random query parameter to avoid caching
        function $importNoCache(src){
            var ms = new Date().getTime().toString();
            var seed = "?" + ms;
            $import(src + seed);
        }
    </script>
    <style>
        .Validform_checktip{font-size:16px;}
        body{font-family:"Microsoft YaHei" !important;background: #fff;margin: 0; padding: 0;}
        h1, h2, h3, h4, h5, h6, dl, dd, dt, ol, ul, li, p, form { margin: 0; padding: 0; }
        ol, ul, li, dl, dd, dt { list-style: none; } a img { border: none; display: block;} em, i { font-style: normal; }
        div, li, ul, ol, dl, dd, dt, p { width: auto;}
        ul, li { margin: 0; padding: 0;}
        table{ border-collapse:collapse; border-spacing:0;}
        a { overflow: hidden; outline: none; text-decoration: none;}
        a:hover { text-decoration:none;}
        .clear { clear: both; font-size: 0; visibility: hidden; width: 0; line-height: 0; }
        .fl { float: left; display: inline; } .fr { float: right; display: inline; }
        .clearfix:after { content:"."; display: block; height: 0; clear: both; visibility: hidden; }
        .clearfix { display: inline-block; }
        * html .clearfix { height: 1%; }
        .clearfix { display: block; }
        .gray{ background: #000; filter:alpha(opacity=70); opacity: 0.7; position: fixed; top:0; width: 100%; height: 100%; z-index: 333;}
        .xy{ background: #fff; width: 500px; height: 300px; border-radius: 10px; position: fixed; top: 50%; left: 50%; margin-left: -250px; margin-top: -150px; z-index: 444;}
        .xy .close{ width: 25px; height: 25px; background: url(__PUBLIC__/home/images/close.png) center no-repeat; background-size: 25px 25px; padding: 5px; display: block; position: absolute; top: 5px; right: 5px;}
        .xy h4{ text-align: center; font-size: 24px; color: #333; line-height: 30px; height: 30px; font-weight: normal; padding-top: 20px;}
        .xy p{ padding: 18px; font-size: 16px; color: #333; line-height: 26px;}
        .gray,#winpop,#transaction{display: none;}
        .text-primary{cursor: pointer;}
    </style>
</head>

<body>
<div class="body">
    <img src="__PUBLIC__/home/images/background_02.jpg" style="width: 100%;height:100%;">
    <!--new-register.jpg-->
</div>
<div class="logo">
    <a href="__URL__/index"><img src="__ROOT__/{$logo.logo}"></a>
    <!--logo.png-->
</div>
<div class="main">
    <form action="__URL__/register_do" id="msform" method="post">
        <div class="error-box"></div>
        <ul id="progressbar">
            <li class="active">步骤一</li>
            <li>步骤二</li>
        </ul>
        <div class="listing" style="height:20px;">
            <a href="<?=U('Index/index');?>" class="list-icon1">返回首页</a>
            <a href="<?=U('Index/loginView');?>" class="list-icon2">已有账户，立即登录</a>
            <div class="clr"></div>
        </div>
        <!-- 第一步 -->
        <fieldset>
            <h2 class="fs-title">个人信息</h2>
            <div class="login-group">
                <label for="">姓名(英文)</label>
                <input type="text" class="login-input" placeholder="请输入英文或拼音" id="user_name" name="user_name" maxlength="100" datatype="/^[a-zA-Z\d]+$/" nullmsg="null" errormsg="&#xe706;" sucmsg=" "/>
                <span class="important">*</span>
                <span class="important Validform_checktip Hui-iconfont"></span>
            </div>
            <div class="login-group">
                <label for="">姓名(中文)</label>
                <input type="text" class="login-input" placeholder="请输入中文姓名" id="name_zh_cn" name="name_zh_cn" maxlength="100" datatype="*" nullmsg="null" errormsg="&#xe706;" sucmsg=" "/>
                <span class="important">*</span>
                <span class="important Validform_checktip Hui-iconfont"></span>
            </div>
            <div class="login-group">
                <label for="">性别</label>
                <select class="login-input w70 city" style="width:69%;" data-placement="top" data-toggle="tooltip" title="" name="sex">
                    <option value="1">先生</option>
                    <option value="2">女士</option>
                </select>
                <span class="important">*</span>
                <span class="important Validform_checktip Hui-iconfont"></span>
            </div>
            <div class="login-group">
                <label for="">电话</label>
                <input type="text" class="login-input" placeholder="请输入电话号码" id="user_phone" name="user_phone" maxlength="100" datatype="/^13[0-9]{9}$|14[0-9]{9}|15[0-9]{9}$|17[0-9]{9}$|18[0-9]{9}$/" nullmsg="null" errormsg="&#xe706;" sucmsg=" "/>
                <span class="important">*</span>
                <span class="important Validform_checktip Hui-iconfont"></span>
            </div>
            <div class="login-group">
                <label for="">邮箱</label>
                <input type="text" class="login-input" placeholder="请输入电子邮箱" id="user_email" name="user_email" maxlength="100" datatype="e" nullmsg="null" errormsg="&#xe706;" sucmsg=" "/>
                <span class="important">*</span>
                <span class="important Validform_checktip Hui-iconfont"></span>
            </div>
            <div class="login-group">
                <label for="">证件号码</label>
                <select class="login-input" style="width:18%" name="card_type">
                    <option value="1">中国身份证</option>
                    <option value="2">香港身份证</option>
                    <option value="3">台湾身份证</option>
                    <option value="4">护照</option>
                </select>
                <input type="text" class="login-input" placeholder="请输入证件号码" name="user_cards" maxlength="50" id="user_cards" datatype="*" nullmsg="null" errormsg="&#xe706;" sucmsg=" " style="width:46%;"/><!--/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/-->
                <span class="important">*</span>
                <span class="important Validform_checktip Hui-iconfont"></span>
            </div>
            <if condition="$switch.foreign eq 1">
                <div class="login-group">
                    <label for="">交易类型</label>
                    <select class="login-input w70 city" style="width:69%;" data-placement="top" data-toggle="tooltip" title="" name="type">
                        <!--<option value="1">短期交易</option>-->
                        <option value="2">外汇交易</option>
                    </select>
                    <span class="important">*</span>
                    <span class="important Validform_checktip Hui-iconfont"></span>
                </div>
            </if>
            <div class="login-group">
                <label for="">出生日期</label>
                <input type="text" class="login-input" placeholder="请输入出生日期" id="birthday" name="user_birthday" maxlength="100" id="user_birthday" datatype="*6-16" nullmsg="null" errormsg="&#xe706;" sucmsg=" "/>
                <span class="important">*</span>
                <span class="important Validform_checktip Hui-iconfont"></span>
            </div>
            <!-- <div class="login-group">
                 <label for="">微信</label>
                 <input type="text" class="login-input" placeholder="微信号" name="weixin" maxlength="100"/>
                 <span class="important"></span>
                 <span class="important Validform_checktip Hui-iconfont"></span>
             </div>
             <div class="login-group">
                 <label for="">QQ</label>
                 <input type="text" class="login-input" placeholder="QQ号" name="user_qq" maxlength="100"/>
                 <span class="important"></span>
                 <span class="important Validform_checktip Hui-iconfont"></span>
             </div>-->
            <div class="login-group">
                <label for="">推荐码</label>
                <input type="text" class="login-input" value="{$agent}" placeholder="请输入推荐码" name="user_belong" maxlength="11" id="user_recommend"/><!-- datatype="*5-6" nullmsg="null" errormsg="&#xe706;" sucmsg=" "-->
                <span class="important">*</span>
                <span class="important Validform_checktip Hui-iconfont"></span>
            </div>

            <input type="button" class="next login-button " value="下一步" />
        </fieldset>
        <!-- 第二步 -->
        <fieldset class="fieldset-two">
            <h2 class="fs-title">个人信息</h2>
            <div class="login-group">
                <label for="">地址</label>
                <input type="text" class="login-input" placeholder="请输入地址,只能输入英文" name="user_address" maxlength="50" id="user_address" datatype="/^[a-zA-Z0-9]+$/" nullmsg="null" errormsg="&#xe706;" sucmsg=" "/>
                <span class="important">*</span>
                <span class="important Validform_checktip Hui-iconfont"></span>
            </div>
            <div class="login-group">
                <label for="">省份</label>
                <input type="text" class="login-input" placeholder="请输入省份" name="province" maxlength="100" id="province" datatype="/^[a-zA-Z]+$/" nullmsg="null" errormsg="&#xe706;" sucmsg=" "/>
                <span class="important">*</span>
                <span class="important Validform_checktip Hui-iconfont"></span>
            </div>

            <div class="login-group">
                <label for="">城市</label>
                <input type="text" class="login-input" placeholder="请输入城市" name="city" maxlength="100" id="city" datatype="/^[a-zA-Z]+$/" nullmsg="null" errormsg="&#xe706;" sucmsg=" "/>
                <span class="important">*</span>
                <span class="important Validform_checktip Hui-iconfont"></span>
            </div>
            <!--<div class="login-group">
                <label for="">杠杆</label>
                <select id="leverage" class="login-input w70" style="width:69%;" placeholder="杠杆" data-placement="top" data-toggle="tooltip" title="" name="proportion">
                    <option value="1">1:1</option>
                    <option value="10">1:10</option>
                    <option value="50">1:50</option>
                    <option value="100">1:100</option>
                    <option value="200">1:200</option>
                    <option value="300">1:300</option>
                    <option value="400">1:400</option>
                    <option value="500">1:500</option>
                </select>
                <span class="important">*</span>
            </div>-->
            <div class="login-group">
                <label for="">密码</label>
                <input type="password" class="login-input" placeholder="请输入密码" name="password" maxlength="15" id="password" datatype="/^(?=.*[0-9].*)(?=.*[A-Z].*)(?=.*[a-z].*).{6,12}$/" nullmsg="null" errormsg="&#xe706;" sucmsg=" "/>
                <span class="important">*</span>
                <span class="important Validform_checktip Hui-iconfont"></span>
            </div>
            <div class="point">密码须为6到15位字符，须包含这三种字符类型：小写、大写字母及数字。</div>

            <div class="login-group">
                <label for="">确认密码</label>
                <input type="password" class="login-input" placeholder="请确认密码" name="repwd" maxlength="15" id="repwd" datatype="/^(?=.*[0-9].*)(?=.*[A-Z].*)(?=.*[a-z].*).{6,12}$/" recheck="password" nullmsg="null" errormsg="&#xe706;" sucmsg=" "/>
                <span class="important">*</span>
                <span class="important Validform_checktip Hui-iconfont"></span>
            </div>
            <div class="login-group">
                <label for="">验证码</label>
                <input type="text" class="w22 login-input"datatype="*" name="verification" placeholder="请输入验证码" nullmsg="null" errormsg="&#xe706;" sucmsg=" "/>
                <img class="Verify" style="width:22%;height:50px;" src="__URL__/Verify"/>
                <input type="button" value="换一换" class="code reloadVerify">
                <span class="important">*</span>
                <span class="important Validform_checktip Hui-iconfont"></span>
            </div>
            <div class="login-group">
                <label for=""><input type="checkbox" name="agree" id="agreement_text"   title=""></label>
                <b>我已阅读，了解并同意<a class="text-primary winpop"> 理财类风险协议</a> 和 <a class="text-primary transaction">交易类风险协议</a></b>
            </div>
            <!--<div class="login-group mt-20">
                <label for=""><input type="checkbox" name="agree" id="term_condition_one"   title=""></label>
                <b>本人已充分了解并知晓交易传统外汇及短期外汇固有风险的存在，且入金或导致部分或所有资金损失。本人知悉{$logo.web_name_en}平台与市场营销人员的市场评论。</b>
            </div>-->
            <input type="button" name="previous" class="login-button  previous " value="上一步" />
            <input type="submit" name="submit" class="login-button submit" id="submit-btn" value="完成注册"/>
        </fieldset>
    </form>
</div>
<!--     <div class="footer mb20">
    金融集团 版权所有 蜀icp备2016022323号 copyright © 2005-2024 man sing financial All Rights Reserved.
</div> -->

<!----风险提示-理财类---->
<!----弹窗---->
<div class="gray"></div>
<div class="xy" id="winpop">
    <a href="javascript:;" class="close" onclick="closePop('winpop')"></a>
    <h4>风险协议</h4>
    <p>根据监管部门的相关规定，特向您提示：理财非存款、产品有风险、投资须谨慎。您购买的是保本浮动收益型理财产品，则只保障理财资金本金，不保证理财具体定额收益，您应当充分认识投资风险，谨慎投资；鉴于存在这些风险，客户应该在完全了解所涉投资的性质以及自身面临资金占余程度后进行投资理财。客户应该根据个人经验、投资目标、资金来源和其它相关自身情况仔细地考虑这类投资是否适合您。如果您有任何疑问，请您咨询我们的专业理财顾问。</p>
</div>

<!--风险提示-交易类-->
<div class="xy" id="transaction">
    <a href="javascript:;" class="close" onclick="closePop('transaction')"></a>
    <h4>风险协议</h4>
    <p>航线交易合约进行投资和交易是投资性的，具有高度风险性，通常指适合于能够承担交易金额损失风险的人士，鉴于存在这些风险，客户应该在完全了解所涉交易的性质以及自身面临风险的程度后才进行交易。航线交易对于某些顾客并不合适。客户应该根据个人经验、投资目标、资金来源和其它相关情况仔细地考虑这类交易是否适合您。您应该很清楚地认识到航线交易的风险。如果您有任何疑问，请您咨询我们的交易分析顾问。</p>
</div>
</body>
<include file="common_js"/>
<script src="__PUBLIC__/home/Js/jquery.easing.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/home/Js/register.js" type="text/javascript"></script>
<script src="__PUBLIC__/admin/js/plugins/layer/laydate/laydate.js"></script>
<script type="text/javascript">
    $(function (){
        laydate({
            elem: '#birthday', /*目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'*/
            event: 'focus', /*响应事件。如果没有传入event，则按照默认的click*/
            //format: 'YYYY-MM-DD hh:mm:ss',
        });

        var index;
        $("#msform").Validform({
            btnSubmit:"#submit-btn",
            ajaxPost:true,
            tiptype: function(msg, o, cssctl) {
                //msg：提示信息;
                //o:{obj:*,type:*,curform:*}, obj指向的是当前验证的表单元素（或表单对象），type指示提示的状态，值为1、2、3、4， 1：正在检测/提交数据，2：通过验证，3：验证失败，4：提示ignore状态, curform为当前form对象;
                //cssctl:内置的提示信息样式控制函数，该函数需传入两个参数：显示提示信息的对象 和 当前提示的状态（既形参o中的type）;
                if (!o.obj.is("form")) { //验证表单元素时o.obj为该表单元素，全部验证通过提交表单时o.obj为该表单对象;
                    var objtip = o.obj.siblings(".Validform_checktip");
                    cssctl(objtip, o.type);
                    objtip.text(msg);
                }
            },beforeSubmit:function(curform){
                var check=$("#agreement_text").is(':checked');
                if(!check){
                    layer.msg('请仔细阅读风险协议');return false;
                }
                //$('#submit-btn').hide();
                index = layer.load();
            },callback:function(data){
                layer.close(index);
                console.log(data);
//                alert(JSON.stringify(data));return;
                if(data.status==1){
                    //layer.msg(data.msg);
                    layer.msg(data.msg);
                    setTimeout(window.location.href="<?=U('Index/loginView');?>",1000);
                }else if(data.status==0){
                    layer.alert(data.msg, {
                        icon: 2,
                        skin: 'layer-ext-moon' //该皮肤由layer.seaning.com友情扩展。关于皮肤的扩展规则，去这里查阅
                    })
                }else{
                    layer.msg('网络错误');
                    /*layer.open({
                     type: 1,
                     title: false,
                     closeBtn: 0,
                     area: ['280px', '180px'],
                     shadeClose: true,
                     skin: '',
                     content: '<div style="width:280px;height:180px;text-align: center;line-height:180px;background:#CCCCCC;font-weight: bold;color:red;font-size: 28px">网络错误</div>'
                     });*/
                }
            }
        });

        /*$('#user_cards').bind('input propertychange', function() {
            var card = ($(this).val()).replace(/\s/g,"");
            var birth,year,month,day;
            if(card.length==18){
                var birthday = card.substring(6, 14);
                year=birthday.substring(0,4);
                month=birthday.substring(4,6);
                day=birthday.substring(6,8);
            }else if(card.length==15){
                var birthday =card.substring(6, 12);
                year='19'+birthday.substring(0,2);
                month=birthday.substring(2,4);
                day=birthday.substring(4,6);
            }
            birth=year+'-'+month+'-'+day;
            $("#birthday").val(birth);
        });*/

    });

    $('.reloadVerify').click(function (){
        $('.Verify').attr('src','__URL__/Verify?rnd='+Math.random());
    });

    $('.winpop').click(function (){
        $('.gray').show();
        $('#winpop').show();
    });

    $('.transaction').click(function (){
        $('.gray').show();
        $('#transaction').show();
    });

    function closePop(type){
        $('.gray').hide();
        if(type=='winpop'){
            $('#winpop').hide();
        }else{
            $('#transaction').hide();
        }
    }
</script>
</html>
